package com.sanploy.file.enums;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * Created by zhu yingzhi on 2017/9/13.
 */
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum  Meta {
    SUCCESS(200, "Response Success!",RespType.SUCCESSFUL),
    Fail(200, "Response Fail!",RespType.FAIL);

    private int code;
    private String message;
    private RespType type;
    Meta(int code,String message,RespType type){
        this.code = code;
        this.message = message;
        this.type = type;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public RespType getType() {
        return type;
    }

    public void setType(RespType type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return "code="+code+" message="+message+" type="+type.toString();
    }
}
